package icasue.net.socket.model.register;

import java.util.Objects;

/**
 * @Author: Qiao Hang
 * @CreateDate: 2021/3/18 下午5:41
 * @UpdateDate:
 * @Description: 组队模式车辆注册信息.
 */
public class CarRegisterInfo extends RegisterInfo {
    /**
     * VIN码
     */
    private String vin;

    /**
     * 车辆品牌/型号
     */
    private String brand;

    /**
     * 车牌号
     */
    private String carNum;

    /**
     * 颜色
     */
    private String color;

    @Override
    public Object getIdentity() {
        return this.vin;
    }

    @Override
    public boolean checkValid() {
        return Objects.nonNull(this.getIdentity())
                && Objects.nonNull(this.vin)
                && Objects.nonNull(this.brand)
                && Objects.nonNull(this.carNum);
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getCarNum() {
        return carNum;
    }

    public void setCarNum(String carNum) {
        this.carNum = carNum;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
